class Celery(object):

    def broker(self,func):
        '''
        任务队列
        :param func:
        :return:
        '''
        self.broker_list = []
        self.broker_list.append(func)

    def worker(self,func):
        '''
        任务执行者
        :param func:
        :return:
        '''

        if func in self.broker_list:
            func()



# 客服端操作
def send_email():
    print(1111)


c=Celery()
c.broker(send_email)

c.worker(send_email)